package com.eagle.rate.entity;
// default package

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user", catalog = "traderate")
public class User implements java.io.Serializable {

	// Fields

	private Integer id;
	private String userName;
	private String sessionkey;
	private Timestamp lastLogin;
	private Timestamp downloadDate;
	private Timestamp deadline;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(Timestamp deadline) {
		this.deadline = deadline;
	}

	/** full constructor */
	public User(String userName, String sessionkey, Timestamp lastLogin,
			Timestamp downloadDate, Timestamp deadline) {
		this.userName = userName;
		this.sessionkey = sessionkey;
		this.lastLogin = lastLogin;
		this.downloadDate = downloadDate;
		this.deadline = deadline;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "userName", length = 20)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "sessionkey", length = 100)
	public String getSessionkey() {
		return this.sessionkey;
	}

	public void setSessionkey(String sessionkey) {
		this.sessionkey = sessionkey;
	}

	@Column(name = "lastLogin", length = 19)
	public Timestamp getLastLogin() {
		return this.lastLogin;
	}

	public void setLastLogin(Timestamp lastLogin) {
		this.lastLogin = lastLogin;
	}

	@Column(name = "downloadDate", length = 19)
	public Timestamp getDownloadDate() {
		return this.downloadDate;
	}

	public void setDownloadDate(Timestamp downloadDate) {
		this.downloadDate = downloadDate;
	}

	@Column(name = "deadline", nullable = false, length = 19)
	public Timestamp getDeadline() {
		return this.deadline;
	}

	public void setDeadline(Timestamp deadline) {
		this.deadline = deadline;
	}

}